﻿Imports System.Net

Public Class Checks

    Public Function isConnectedToInternet() As Boolean
        Dim connected As Boolean = False

        Try
            Dim wc As New WebClient
            Dim st As System.IO.Stream = wc.OpenRead("http://www.google.it")
            st.Close()
            connected = True
        Catch ex As Exception
            connected = False
        End Try

        Return connected
    End Function
End Class
